/*
* http  exporess
* */

let Koa = require("koa");

/* koa实例化对象*/
let koa = new Koa();

koa.use(async (ctx) => {

  /*await 异步 -->同步 */

  ctx.body = {
    name: "张三"
  };

});

koa.listen(7001);

console.log("server running...");


/*
  use

* ctx : response
* ctx.body = {}
* */